<template>
  <div class="info"> 
      <blg-header></blg-header>

<!-- 展开关闭按钮 -->
<el-radio-group v-model="isCollapse" style="margin-bottom: 20px;" class="btn-radio">
  <el-radio-button :label="false">展开</el-radio-button>
  <el-radio-button :label="true">收起</el-radio-button>
</el-radio-group>

<el-row>
<!-- 侧边菜单 -->
<el-col :span="4">
<el-menu default-active="1-4-1" 
class="el-menu-vertical-demo" 
@open="handleOpen" 
@close="handleClose" 
:collapse="isCollapse"
:router="true">
 
 
  <el-menu-item index="/info/userinfo">
    
      <i class="el-icon-menu"></i>
      <span slot="title">个人信息预览</span>
    
  </el-menu-item>

  <el-menu-item index="/info/issue">
    <i class="el-icon-document"></i>
    <span slot="title">发表文章</span>
  </el-menu-item>

  <el-menu-item index="3" disabled>
    <i class="el-icon-document"></i>
    <span slot="title">修改文章</span>
  </el-menu-item>

  <el-menu-item index="4">
    <i class="el-icon-setting"></i>
    <span slot="title">设置个人信息</span>
  </el-menu-item>

</el-menu>
</el-col>

<el-col :span="20">
 <router-view></router-view>
</el-col>
 </el-row>

  </div>
</template>

<script>
import header from '../components/header.vue'

export default {
    components:{
        'blg-header' : header
    },
     data() {
      return {
        isCollapse: true
      };
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
}
</script>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
  }
.yellow{
    background-color: yellow;
    height: 100%;
    width: 100%;
}
.btn-radio{
    position: relative;
    left: -44%;
}
</style>